<?php

class EditedByUser extends Doctrine_Template {
	
	public function setTableDefinition() {
		$this->hasColumn('created_by', 'integer');
		$this->hasColumn('updated_by', 'integer');
		$this->hasColumn('deleted_by', 'integer');
		$this->addListener(new EditedByUserListener());
	}
	
	public function setUp() {
		$this->hasOne('sfGuardUser as Creator', array(
			'local' => 'created_by',
			'foreign' => 'id',
			'class' => 'sfGuardUser'));
		$this->hasOne('sfGuardUser as Updator', array(
			'local' => 'updated_by',
			'foreign' => 'id',
			'class' => 'sfGuardUser'));
		$this->hasOne('sfGuardUser as Deletor', array(
			'local' => 'deleted_by',
			'foreign' => 'id',
			'class' => 'sfGuardUser'));
	}
}

?>